/*  HostMon/msntop - A simple program to monitor hosts on android
	Copyright (C) 2009 Devendra Laulkar

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation version 2 of the License. 

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.android.msntop;

import java.util.HashMap;

public class Host extends HashMap<String, Object> {

	public static String NAME = "Nm";
	public static String STATUS = "St";
	public static String COMMENT = "Co";
	public static String DBID = "id";
	public static String SSHUSER = "sshU";
	public static String SSHPORT = "sshP";
	public static String BARCODE = "bc";
	public static String OPTPATH = "optPath";

	public String getName() {
		return (String)this.get(NAME);
	}
	public void setName(String name) {
		this.put(NAME, name);
	}
	public String getStatus() {
		return (String)this.get(STATUS);
	}
	public void setStatus(String status) {
		this.put(STATUS, status);
	}

	public String getComment() {
		return (String)this.get(COMMENT);
	}
	public void setComment(String comment) {
		this.put(COMMENT, comment);
	}

	public long getId() {
		return (Long) this.get(DBID);
	}
	public void setId(long id) {
		this.put(DBID, id);
	}

	public String getSshUser() {
		return (String) this.get(SSHUSER);
	}
	public void setSshUser(String user) {
		this.put(SSHUSER, user);
	}

	public String getSshPort() {
		return (String)this.get(SSHPORT);
	}
	public void setSshPort(String port) {
		this.put(SSHPORT, port);
	}

	public String getBarcode(){
		return (String) this.get(BARCODE);
	}

	public void setBarcode(String bc)
	{
		this.put(BARCODE, bc);
	}

	public String getOptPath() {
		return (String)this.get(OPTPATH);
	}
	public void setOptPath(String optPath) {
		this.put(OPTPATH, optPath);
	}

	public Host(String name, String status, String comment)
	{
		setName(name);
		setStatus(status);
		setComment(comment);
		setSshPort(HostDbAdapter.UNSET_SSHPORT);
		setSshUser(HostDbAdapter.UNSET_SSHUSER);
		setOptPath(null);
	}

	public Host(long id, String name, String status, String comment)
	{
		this(name,status,comment);
		setId(id);
	}

	public Host(long id, String name, String status, String comment, String optPath)
	{
		this(name,status,comment);
		setId(id);
		setOptPath(optPath);
	}

	public Host(long id, String name, String status, String comment, String optPath, String user, String port)
	{
		this(id,name,status,comment, optPath);
		setSshUser(user);
		setSshPort(port);
	}
}
